<script setup lang="ts">
import { ref } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
import CustomNavbar from './components/CustomNavbar.vue'
import { getHomeBannerAPI } from '@/services/home'
import type { BannerItem } from '@/types/home'
const banerList = ref<BannerItem[]>([])

const gethomeData = async () => {
  const res = await getHomeBannerAPI()
  console.log(res)
  banerList.value = res.result
}
onLoad(() => {
  console.log(111111)

  gethomeData()
}) //
</script>

<template>
  <CustomNavbar />
  <XtxSwiper />
  <view class="index" @click="gethomeData">111 </view>
</template>

<style lang="scss">
//
</style>
